package com.zoweunion.mechanic;

import com.zoweunion.mechanic.model.MyConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@EnableConfigurationProperties({MyConfig.class})
@SpringBootApplication
@EnableTransactionManagement    //开启事务注解
@EnableScheduling //开启基于注解的定时任务
@MapperScan({"com.zoweunion.mechanic.dao"})//开启mapper文件扫描2
@EnableSwagger2
@EnableAsync
public class MechanicApplication {

    protected static Logger logger = LoggerFactory.getLogger(MechanicApplication.class);

    public static void main(String[] args) {
        logger.info("SpringBoot Start");
        SpringApplication.run(MechanicApplication.class, args);
        logger.info("SpringBoot Start Success");
    }
}